package com.jin.crud.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jin.crud.bean.QueryDto;
import com.jin.crud.bean.SysRole;

import java.util.List;

/**
 * <p>
 * 角色信息表 Mapper 接口
 * </p>
 *
 * @author yuxuejin
 * @since 2021-11-16
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {

    List<SysRole> getByPage(QueryDto param);

    SysRole checkRoleNameUnique(String roleName);

    int updateRole(SysRole param);

    SysRole selectRoleById(String roleId);

    List<SysRole> selectRolePermissionByUserId(String userId);

    List<SysRole> selectRolesByUserName(String userName);

    List<String> selectRoleListByUserId(String userId);
}
